package pattern.observer.jdk;

import java.util.Observable;

/**
 * Created by boot on 8/31/15.
 */
public class WeatherSubject extends Observable {

    private String content;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
        // Note : when you use the observer pattern
        // You must add the follow line:
        setChanged();

        // push
        notifyObservers(content);

        // pull
        //notifyObservers();
    }
}
